import request from '@/utils/request'

export function getReadmeMd(){
  return request({
    url: '/sys/readMe',
    method: 'get'
  })
}

export function getIndex() {
  return request({
    url: '/sys/index',
    method: 'get'
  })
}

// 发送验证码
export function sendEmail(data) {
  return request({
    url: '/sys/send',
    method: 'post',
    data
  })
}
// 注册
export function sendReg(data) {
  return request({
    url: '/sys/reg',
    method: 'post',
    data
  })
}
// 注册
export function verifyApi(data) {
  return request({
    url: '/sys/verifyCode',
    method: 'post',
    data
  })
}
// 修改密码
export function changePwd(data) {
  return request({
    url: '/sys/changePwd',
    method: 'put',
    data
  })
}

export function userLogin(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function userInfo() {
  return request({
    url: '/sys/userInfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: 'sys/logout',
    method: 'post'
  })
}
